package com.sgb.kjwl.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @date 2021/4/28
 * @author 黄淋
 * Description:
 */
public class YoungDateUtils {

    public static String timestampToDate(long time) {
        if (time == 0){
            return "";
        }

        if (time < 10000000000L) {
            time = time * 1000;
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String sd = sdf.format(new Date(Long.parseLong(String.valueOf(time))));
        return sd;
    }
}
